CRPEngine::GetHandleString
Use CRPEngine::GetHandleString to retrieve the text to which the string handle is pointing. The CString object will contain the actual text. This function is used in conjunction with functions that return variable length strings. After your program allocates a buffer of sufficient size, this function moves the string from the string handle to the buffer.
BOOL GetHandleString (
HANDLE textHandle,
short textLength,
CString &string );
Parameters
textHandle
| Specifies the handle of the string containing the text of interest.
|
textLength
| Specifies the length of the text string, including the terminating null byte. This value should be identical to the length of the string obtained by the variable length string function.
|
string
| Reference to the CString object obtained by the variable length string function.
|
Returns
- TRUE if the call is successful.
- FALSE if the call fails.
Remarks
- Because the string handle is discarded once the method is called, you can use this call only once with a given string handle. If you expect to use the string later, you will need to save it.
- When you call the method that produces the string, it returns a length that includes a provision for the null byte at the end of the string. A buffer set to that length will hold the entire string, including the terminating null byte.